﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using Microsoft.Phone.Tasks;
using System.Windows.Media;

namespace power
{
    public partial class createSlide : PhoneApplicationPage
    { 
       
        
        public createSlide()
        {
            InitializeComponent();
            
        }

      private void btn_paint_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            NavigationService.Navigate(new Uri("/scrible.xaml", UriKind.Relative));
        }

      #region Boton Camara

        void cameracapure_completo(object sender, PhotoResult e)
        {

            if (e.TaskResult == TaskResult.OK)
            {

                System.Windows.Media.Imaging.BitmapImage bmp = new System.Windows.Media.Imaging.BitmapImage();
                bmp.SetSource(e.ChosenPhoto);

                ImagenF1.Source = bmp;



            }

            else
            {

            }

     

        }

         

      #endregion

        private void btn_galeria_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            PhotoChooserTask photoChooserTask = new PhotoChooserTask();
            photoChooserTask.Completed += new EventHandler<PhotoResult>(cameracapure_completo);
            photoChooserTask.Show();
        }

        private void btn_camara_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
          //  NavigationService.Navigate(new Uri("/takepincture.xaml", UriKind.Relative));
            CameraCaptureTask cameraCaptureTask = new CameraCaptureTask();
            cameraCaptureTask.Completed += new EventHandler<PhotoResult>(cameracapure_completo);
            cameraCaptureTask.Show();
            
        }






    }
}